/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2025-07-16 23:34:16
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2025-07-17 00:08:10
 * @FilePath: /medical-companion-app/src/api/service.api.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { request, METHOD } from "@/service/http.service";

export function getClinicList(params = {}) {
  return request({
    url: "/clinics",
    method: METHOD.GET,
    params
  }).then(({ data }) => data);
}


export function getClinicDetail(pk) {
  return request({
    url: `/clinics/${pk}`,
    method: METHOD.GET,
  }).then(({ data }) => data);
}


export function createClinic(serviceData) {
  return request({
    url: "/clinics/create",
    method: METHOD.POST,
    data: serviceData,
  }).then(({ data }) => data);
}


export function updateClinic(pk, serviceData) {
  return request({
    url: `/clinics/${pk}/update`,
    method: METHOD.PUT,
    data: serviceData,
  }).then(({ data }) => data);
}


export function deleteClinic(pk) {
  return request({
    url: `/clinics/${pk}/delete`,
    method: METHOD.DELETE,
  }).then(({ data }) => data);
}
